package com.yb.xczx.cloud.auth.generator;

import com.yb.core.enums.LoginTypeEnum;
import com.yb.core.model.XczxLoginUser;

import java.util.UUID;

public class XczxMobileCodeGenerator implements XczxCodeGenerator{

    @Override
    public String generate(XczxLoginUser xczxLoginUser) {
        String code = UUID.randomUUID().toString().replaceAll("-", "");

        return code;
    }

    @Override
    public boolean support(String loginType) {
        return LoginTypeEnum.MOBILE_CODE.getLoginType().equals(loginType);
    }
}
